﻿<%@ Page Language="C#" MasterPageFile="~/User/MasterPage.master" AutoEventWireup="true" CodeFile="ScoreModify.aspx.cs" Inherits="User_ScoreModify" Title="无标题页" %>

<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:CXDB %>" 
        SelectCommand="SELECT [TradeID], [TradeName] FROM [CX_Company_Sys_Trade]"></asp:SqlDataSource>
    <ext:Store ID="Store1" DataSourceID="SqlDataSource1" runat="server">
        <Reader>
            <ext:JsonReader>
                <Fields>
                    <ext:RecordField Name="TradeID" Type="Int"></ext:RecordField>
                    <ext:RecordField Name="TradeName"  Type="String"></ext:RecordField>
                </Fields>
            </ext:JsonReader>
        </Reader>
    </ext:Store>
    <table style="width:100%;line-height:25px;">
        <tr>
            <td style="text-align:center;font-size:14px;">行业类别</td>
            <td style="text-align:center;font-size:14px;">数据类型</td>
            <td style="text-align:center;font-size:14px;">修改数值</td>
            <td style="text-align:center;font-size:14px;"></td>
        </tr>
        <tr>
            <td style="text-align:center;font-size:14px;">
            <ext:ComboBox ID="ComboBox1"
                            StoreID="Store1"
                            DisplayField="TradeName"
                            ValueField="TradeID"
                            runat="server">
            </ext:ComboBox>
            </td>
            <td style="text-align:center;font-size:14px;">
                <ext:ComboBox ID="ComboBox2" 
                            runat="server">
                            <Items>
                                <ext:ListItem Text="产业政策" Value="1" />
                                <ext:ListItem Text="支柱产业" Value="2" />
                                <ext:ListItem Text="行业生命周期" Value="3" />
                                <ext:ListItem Text="和国外的差距" Value="4" />
                                <ext:ListItem Text="行业进入壁垒" Value="5" />
                            </Items>
            </ext:ComboBox>
            </td> 
            <td style="text-align:center;font-size:14px;">
                <ext:NumberField ID="NumberField1" Text="1" MaxValue="1" runat="server">
                </ext:NumberField>
            </td>
            <td style="text-align:center;font-size:14px;">
                <ext:Button ID="Button1" runat="server" Text="提交" Icon="AwardStarAdd">
                    <AjaxEvents>
                        <Click OnEvent="Sub"></Click>
                    </AjaxEvents>
                </ext:Button>
            </td>
        </tr>
    </table>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:CXDB %>" 
        SelectCommand="SELECT [ID], [tradename], [scores], [intime] FROM [CX_CompanyTradeModifyLog] ORDER BY [ID] DESC"></asp:SqlDataSource>
    <ext:Store ID="Store2" DataSourceID="SqlDataSource2" runat="server">
        <Reader>
            <ext:JsonReader>
                <Fields>
                    <ext:RecordField Name="ID" Type="Int"></ext:RecordField>
                    <ext:RecordField Name="tradename" Type="String"></ext:RecordField>
                    <ext:RecordField Name="scores" Type="Int"></ext:RecordField>
                    <ext:RecordField Name="intime" Type="Date" ></ext:RecordField>
                </Fields>
            </ext:JsonReader>
        </Reader>
        <AutoLoadParams>
         <ext:Parameter Name="start" Mode="Raw" Value="0" />
         <ext:Parameter Name="limit" Mode="raw" Value="25" />
     </AutoLoadParams>
    </ext:Store>
    <ext:GridPanel ID="GridPanel1" StoreID="Store2" AutoExpandColumn="intime" AutoHeight="true" AutoScroll="true" AutoWidth="true" runat="server">
    <ColumnModel>
        <Columns>
            <ext:Column DataIndex="ID" Header="编号"></ext:Column>
            <ext:Column DataIndex="tradename" Header="行业名称"></ext:Column>
            <ext:Column DataIndex="scores" Header="修改分数"></ext:Column>
            <ext:Column DataIndex="intime" Header="修改时间">
            <Renderer Fn="Ext.util.Format.dateRenderer('Y/m/d H:i:s')" />
            </ext:Column>
            
        </Columns>
    </ColumnModel>
      <BottomBar>
                        <ext:PagingToolBar 
                            ID="PagingToolBar1" 
                            runat="server" 
                            PageSize="20" 
                            StoreID="Store1" 
                            />
                    </BottomBar>
    </ext:GridPanel>
</asp:Content>

